package com.example.demo.entity.enums;

// code 的枚举类
public enum CodeEnum {

    UNKNOWN_ERROR(-999,"未知错误"),
    SUCCESS(0,"OK"),
    // 系统异常
    SYSTEM_ERROR(500,"系统异常"),
    // 业务异常
    PARAMETER_ERROR(601,"参数异常"),
    LOGIN_ERROR(501,"用户名或密码错误");


    private Integer code;

    private String msg;

     CodeEnum(Integer code,String msg){
        this.code=code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
